.dialog{
    position:fixed;
    left:50%;
    top:50%;
    background-color:rgba(0,0,0,0.7);
    z-index:9999;
    padding:5px 10px;
    color:#fff;
    border-radius:5px;
    transform:translate(-50%,-50%);
    -webkit-transform:translate(-50%,-50%);
    -moz-transform:translate(-50%,-50%);
    -ms-transform:translate(-50%,-50%);
    -o-transform:translate(-50%,-50%);
}